home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0110_High intensity background.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-24  |  1KB  |  34 lines

  1. {
  2.    The solutions proposed so far to this problem have ignored
  3.    the fact that there was a way to use high intensity back-
  4.    ground in CGA screens by direct addressing the video port.
  5.    The following procedure works with EGA/VGA as well as CGA
  6.    (and possibly MDA?) videos:
  7.  
  8.    (I skipped function GetAdapterType that should return the
  9.    AdapterType as indicated).
  10.  
  11.    -Jose-
  12.  }
  13.    procedure ToggleBlink(Blink: Boolean);
  14.    var
  15.      Adapter : AdapterType;
  16.      regs    : registers;
  17.      port_   : word;
  18.    begin
  19.      Adapter:= GetAdapterType;
  20.      if Adapter in [CGA,MDA] then begin
  21.        if Adapter = CGA then port_:= $03D8
  22.                         else port_:= $03B8;
  23.        if not Blink then PortW[port_]:= MemW[$0040:$0065] and $00DF
  24.                     else PortW[port_]:= MemW[$0040:$0065]  or $0020;
  25.      end else
  26.      if (Adapter in [VGAColor,EGAColor,VGAMono,EGAMono]) then begin
  27.        if not Blink then regs.bl:= $00
  28.                     else regs.bl:= $01;
  29.        regs.ah:= $10;
  30.        regs.al:= $03;
  31.        intr($10,regs);
  32.      end;
  33.    end;
  34.